<div [@routerTransition]>
  <div class="m-subheader">
    <div class="d-flex align-items-center">
      <div class="mr-auto col-xs-6">
        <h3 class="m-subheader__title m-subheader__title--separator">
          <span>到达率</span>
        </h3>
        <span class="m-section__sub">
          <!-- {{l("UsersHeaderInfo")}} -->
        </span>
      </div>
      <div class="col-xs-6 text-right">
        <button (click)="exportToExcel()" class="btn btn-outline-success"><i class="fa fa-file-excel-o"></i> {{l("ExportToExcel")}}</button>
      </div>
    </div>
  </div>
  <div class="m-content">
    <div class="m-portlet m-portlet--mobile">
      <div class="m-portlet__body">
        <form class="horizontal-form" autocomplete="off">
          <div class="m-form m-form--label-align-right">
            <div class="row align-items-center m--margin-bottom-10">
              <div class="col-xl-12">
                <div class="form-group m-form__group align-items-center">
                  <div class="input-group">
                    <input [(ngModel)]="filterText" name="filterText" autoFocus class="form-control m-input"
                      [placeholder]="l('SearchWithThreeDot')" type="text">
                    <span class="input-group-btn">
                      <button (click)="getPageList()" class="btn btn-primary" type="submit"><i class="flaticon-search-1"
                          [attr.aria-label]="l('Search')"></i></button>
                    </span>
                  </div>
                </div>
              </div>
            </div>

            <div class="row margin-bottom-10" *ngIf="advancedFiltersAreShown">
              <div class="col-sm-12 text-right">
                <button class="btn btn-metal" (click)="getPageList()"><i class="fa fa-refresh"></i>
                  {{l("Refresh")}}</button>
              </div>
            </div>
            <div class="row margin-bottom-10">
              <div class="col-sm-12">
                <span class="clickable-item text-muted" *ngIf="!advancedFiltersAreShown" (click)="advancedFiltersAreShown=!advancedFiltersAreShown"><i
                    class="fa fa-angle-down"></i> {{l("ShowAdvancedFilters")}}</span>
                <span class="clickable-item text-muted" *ngIf="advancedFiltersAreShown" (click)="advancedFiltersAreShown=!advancedFiltersAreShown"><i
                    class="fa fa-angle-up"></i> {{l("HideAdvancedFilters")}}</span>
              </div>
            </div>
          </div>
        </form>

        <div class="row align-items-center">
          <!--<Primeng-TurboTable-Start>-->
          <div class="primeng-datatable-container" [busyIf]="primengTableHelper.isLoading">
            <p-table #dataTable (onLazyLoad)="getPageList($event)" [value]="primengTableHelper.records" rows="{{primengTableHelper.defaultRecordsCountPerPage}}"
              [paginator]="false" [lazy]="true" [scrollable]="true" ScrollWidth="100%" [responsive]="primengTableHelper.isResponsive"
              [resizableColumns]="primengTableHelper.resizableColumns">
              <ng-template pTemplate="header">
                <tr>
                    
                  <th style="width: 100px" pSortableColumn="date">
                    发运日期
                    <p-sortIcon field="date"></p-sortIcon>
                  </th>
                  <th style="width: 120px" pSortableColumn="waybillNumber">
                    运单号
                    <p-sortIcon field="waybillNumber"></p-sortIcon>
                  </th>
                  <th style="width: 100px" pSortableColumn="waybillNumber">
                    发货号 
                    <p-sortIcon field="waybillNumber"></p-sortIcon>
                  </th>
                  <th style="width: 100px" pSortableColumn="waybillNumber">
                    省份
                    <p-sortIcon field="waybillNumber"></p-sortIcon>
                  </th>
                  <th style="width: 100px" pSortableColumn="waybillNumber">
                    服务站代码
                    <p-sortIcon field="waybillNumber"></p-sortIcon>
                  </th>



                  <th style="width: 250px" pSortableColumn="date">
                    收货单位
                    <p-sortIcon field="date"></p-sortIcon>
                  </th>
                  <th style="width: 250px" pSortableColumn="waybillNumber">
                    收件地址
                    <p-sortIcon field="waybillNumber"></p-sortIcon>
                  </th>
                  <th style="width: 120px" pSortableColumn="waybillNumber">
                    联系电话 
                    <p-sortIcon field="waybillNumber"></p-sortIcon>
                  </th>
                  <th style="width: 100px" pSortableColumn="waybillNumber">
                    箱数
                    <p-sortIcon field="waybillNumber"></p-sortIcon>
                  </th>
                  <th style="width: 100px" pSortableColumn="waybillNumber">
                    重量
                    <p-sortIcon field="waybillNumber"></p-sortIcon>
                  </th>


                  <th style="width: 100px" pSortableColumn="date">
                    合计重量
                    <p-sortIcon field="date"></p-sortIcon>
                  </th>
                  <th style="width: 100px" pSortableColumn="waybillNumber">
                    结算金额
                    <p-sortIcon field="waybillNumber"></p-sortIcon>
                  </th>
                  <th style="width: 100px" pSortableColumn="waybillNumber">
                    是否妥投 
                    <p-sortIcon field="waybillNumber"></p-sortIcon>
                  </th>
                  <th style="width: 100px" pSortableColumn="waybillNumber">
                    签收时间
                    <p-sortIcon field="waybillNumber"></p-sortIcon>
                  </th>
                  <th style="width: 100px" pSortableColumn="waybillNumber">
                    签收人
                    <p-sortIcon field="waybillNumber"></p-sortIcon>
                  </th>

                  

                  <th style="width: 100px" pSortableColumn="date">
                    要求到达时限
                    <p-sortIcon field="date"></p-sortIcon>
                  </th>
                  <th style="width: 100px" pSortableColumn="waybillNumber">
                    实际到达时限
                    <p-sortIcon field="waybillNumber"></p-sortIcon>
                  </th>
                  <th style="width: 100px" pSortableColumn="waybillNumber">
                    是否超时 
                    <p-sortIcon field="waybillNumber"></p-sortIcon>
                  </th>
                    
                </tr>
              </ng-template>
              <ng-template pTemplate="body" let-record="$implicit">
                <tr>
                   
                  <td style="width: 100px">
                    <span class="ui-column-title"> {{l('UserName')}}</span> 
                    {{record.startDate | momentFormat:'L'}}
                  </td>
                  <td style="width: 120px">
                    <span class="ui-column-title"> {{l('Name')}}</span>
                    {{record.waybillNo}}
                  </td>
                  <td style="width: 100px">
                    <span class="ui-column-title"> {{l('UserName')}}</span>
                    {{record.shippingNumber}}
                  </td>
                  <td style="width: 100px">
                    <span class="ui-column-title"> {{l('Name')}}</span>
                    {{record.province}}
                  </td>
                  <td style="width: 100px">
                    <span class="ui-column-title"> {{l('UserName')}}</span>
                    {{record.serviceStationCode}}
                  </td>
                  <td style="width: 250px">
                    <span class="ui-column-title"> {{l('Name')}}</span>
                    {{record.serviceStationName}}
                  </td>
                  <td style="width: 250px">
                    <span class="ui-column-title"> {{l('UserName')}}</span>
                    {{record.receiverAddress}}
                  </td>
                  <td style="width: 120px">
                    <span class="ui-column-title"> {{l('Name')}}</span>
                    {{record.contactPhoneNumber}}
                  </td>
                  <td style="width: 100px">
                    <span class="ui-column-title"> {{l('UserName')}}</span>
                    {{record.numberOfCases}}
                  </td>
                  <td style="width: 100px">
                    <span class="ui-column-title"> {{l('Name')}}</span>
                    {{record.weight}}
                  </td>
                  <td style="width: 100px">
                    <span class="ui-column-title"> {{l('UserName')}}</span>
                    {{record.totalWeight}}
                  </td>
                 
                  <td style="width: 100px">
                    <span class="ui-column-title"> {{l('UserName')}}</span>
                    {{record.settlementAmount}}
                  </td>
                  <td style="width: 100px">
                    <span class="ui-column-title"> {{l('Name')}}</span>
                    {{record.isDeliverText}}
                  </td>
                  

                  <td style="width: 100px">
                    <span class="ui-column-title"> {{l('Name')}}</span> 
                    {{record.toSignForTheTime | momentFormat:'L'}}
                  </td>
                  <td style="width: 100px">
                    <span class="ui-column-title"> {{l('UserName')}}</span>
                    {{record.signer}}
                  </td>
                  <td style="width: 100px">
                    <span class="ui-column-title"> {{l('Name')}}</span>
                    {{record.limitDay}}
                  </td>

                  <td style="width: 100px">
                    <span class="ui-column-title"> {{l('Name')}}</span>
                    {{record.actualTimeOfArrival}}
                  </td>
                  <td style="width: 100px">
                    <span class="ui-column-title"> {{l('UserName')}}</span>
                    {{record.isTimeoutText}}
                  </td>
                   
                </tr>
              </ng-template>
            </p-table>
            <div class="primeng-no-data" *ngIf="primengTableHelper.totalRecordsCount == 0">
              {{l('NoData')}}
            </div>
            <div class="primeng-paging-container">
              <p-paginator rows="{{primengTableHelper.defaultRecordsCountPerPage}}" #paginator (onPageChange)="getPageList($event)"
                [totalRecords]="primengTableHelper.totalRecordsCount" [rowsPerPageOptions]="primengTableHelper.predefinedRecordsCountPerPage">
              </p-paginator>
              <span class="total-records-count">
                {{l('TotalRecordsCount', primengTableHelper.totalRecordsCount)}}
              </span>
            </div>
          </div>
          <!--<Primeng-TurboTable-End>-->
        </div>
      </div>
    </div>
  </div>
  <printModal #printModal></printModal>
  <orderinfoModal #orderinfoModal></orderinfoModal>

</div>